/*
 * FileName ImageSource.h
*/

#ifndef __DEEP_ZOOM_IMAGE_IMAGESOURCE_H__
#define __DEEP_ZOOM_IMAGE_IMAGESOURCE_H__

#include "Context.h"

namespace DeepZoomImage
{
	//class MoonSurface;
	class Context;

	class ImageSource 
	{
	protected:
		virtual ~ImageSource ();
		gint32 refcount;

	public:
		ImageSource ();

		virtual void Lock ();
		virtual void Unlock ();

		virtual gint32 GetPixelWidth ();
		virtual void SetPixelWidth (gint32 width);
		virtual gint32 GetPixelHeight ();
		virtual void SetPixelHeight (gint32 height);

		virtual cairo_surface_t *GetImageSurface ();
		virtual MoonSurface *GetSurface (Context *ctx);

		void ref();
		void unref();
		inline int GetRefCount () { return refcount; }
		virtual const char * ToString() { return "Image Source"; }
	}; 
}

#endif /*__DEEP_ZOOM_IMAGE_IMAGESOURCE_H__*/